const Http = require("./Http");

class MusicHttp extends Http{
    //获取城市
    static getCityHttp(){
        return this.request(":8000/city")
    }
    //获取音乐轮播图
    static getMusicBannerHttp(){
        return this.request(":3000/banner")
    }
    //获取热门歌曲
    static getHotMusicHttp(){
        return this.request(":3000/top/playlist/highquality")
    }
    //获取最新音乐
    static getNewMusicHttp(){
        return this.request(":3000/album/newest")
    }
    //获取主播电台
    static getDjMusicHttp(){
        return this.request(":3000/personalized/djprogram")
    }
    //搜索框搜索对应数据
    static getRearchKey(keyword){
        return this.request(`:3000/search?keywords=${keyword}`)
    }
    //通过搜索的id获取歌单图片
    static getMusicDetailById(id){
        return this.request(`:3000/song/detail?ids=${id}`)
    }
    //通过url获取更多页面的显示数据
    static getHttp(url){
        return this.request(url)
    }
    //通过id获取歌单详情页数据
    static getMusicListDetailById(id){
        return this.request(`:3000/playlist/detail?id=${id}`)
    }
    //通过id获取对应的url播放链接
    static getMusicUrlById(id){
        return this.request(`:3000/song/url?id=${id}`)
    }
}

module.exports = MusicHttp;